Packages not to miss!

The packages below have been developed by others for use in R Shiny. They allow for more interactivity without having learn another language (i.e., Python, Javascript, etc.). Depending on the developer, some packages are more flexible than others so I would recommend checking out the documentation to see the limits of each.

 

Plotly

Plotly allows you to easily translate your ggplot2 graphics to an interactive web-based version, and also provides bindings to the plotly.js graphing library.

Plotly Website

 

Dygraphs

Dygraphs provides rich facilities for charting time-series data in R and includes support for many interactive features including series/point highlighting, zooming, and panning.

Dygraphs Website

 

Leaflet

Leaflet is a JavaScript library for creating dynamic maps that support panning and zooming along with various annotations like markers, polygons, and popups.

Leftlet Github

library(leaflet)

m <- leaflet() %>%
  addTiles() %>%  # Add default OpenStreetMap map tiles
  addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
m  # Print the map

 

Datatables

DataTables displays R matrices or data frames as interactive HTML tables that support filtering, pagination, and sorting.

DT Website

library(DT)
datatable(iris, options = list(pageLength = 5))

 

visNEtwork

Useful library to visualize networks

visNework Github

library(visNetwork)
nodes <- data.frame(id = 1:6, title = paste("node", 1:6), 
                    shape = c("dot", "square"),
                    size = 10:15, color = c("blue", "red"))
edges <- data.frame(from = 1:5, to = c(5, 4, 6, 3, 3))
visNetwork(nodes, edges) %>%
  visOptions(highlightNearest = TRUE, nodesIdSelection = TRUE)

 

d3heatmap

Interactive heatmaps with D3 including support for row/column highlighting and zooming.

d3heatmap Website

library(d3heatmap)
d3heatmap(mtcars, scale="column", colors="Blues")

 

DiagrammeR

A tool for creating diagrams and flowcharts using Graphviz and Mermaid. You can use this to create process flows.

DiagrammeR

library(DiagrammeR)
grViz("
  digraph {
    layout = twopi
    node [shape = circle]
    A -> {B C D} 
  }")

 

threejs

threejs has produced widgets for R Shiny. If you want to play around with a 3-D movable graph.

threejs Website

library(threejs)
z <- seq(-10, 10, 0.01)
x <- cos(z)
y <- sin(z)
scatterplot3js(x,y,z, color=rainbow(length(z)))